package myzd.services;

import libedge.domain.exceptions.GenericException;
import myzd.api.domain.ListResult;
import myzd.api.domain.PagedResult;
import myzd.api.domain.TreeResult;
import myzd.client.domain.*;
import myzd.domain.*;
import myzd.domain.enums.ServiceTypeList;
import myzd.domain.request.*;
import myzd.domain.response.*;
import myzd.domain.response.PayPayment;
import myzd.domain.response.PaymentList;
import myzd.domain.response.RefundPayment;

import java.io.IOException;
import java.util.List;


public interface ClientService {


  PagedResult<Hospital> getHospitalListByName(String hospitalName, Integer page, Integer pageSize) throws GenericException;

  PagedResult<Disease> getDiseaseListByDiseaseName(String diseaseName, Integer page, Integer pageSize) throws GenericException;

  PagedResult<DoctorDetailsDto> getDoctorList(
    String name, String hospitalName, String diseaseName, Integer parentCategoryId,
    Integer categoryId, Integer cityId, ServiceTypeList serviceType, Integer page, Integer pageSize) throws GenericException;

  PagedResult<City> getCityList(Integer provinceId, String cityName) throws GenericException;

  PagedResult<Province> getProvinceList(String initial) throws GenericException;

  //add by wanglei
  PagedResult<Counties> getCountryByCityId(Integer cityId) throws GenericException;

  ListResult<TreeResult<DiseaseCategory>> getAllDiseaseCategory() throws GenericException;

  Hospital getHospitalById(Integer id) throws IOException, GenericException, GenericException;

  Disease getDiseaseById(Integer id) throws GenericException, IOException;

  City getCityById(Integer id) throws GenericException, IOException;

  DoctorDetailsDto getDoctorById(Integer id) throws GenericException, IOException;

  ListResult<Department> getGroupList() throws GenericException;

  ListResult<QiYeEmployee> getUserList() throws GenericException;

  QiYeEmployee getUserByStaffId(String staffId) throws IOException, GenericException;

  ServiceOrder createOrder(CreateAppointmentRequest createAppointmentRequest) throws GenericException, IOException;

  List<Doctor> recommendDoctors(Long orderNumber, ListRequest<DoctorRequest> doctorIds) throws GenericException;

  List<DoctorRequest> getDoctorsByIdList(List<Integer> doctorIds) throws GenericException;

  ServiceOrder getOrderById(Long id) throws GenericException, IOException;

  PaymentList getOrderPaymentByOrderNumber(Long orderNumber) throws GenericException, IOException;

  ListResult<TrackDTO> listTracks(Long id) throws GenericException, IOException;

  ServiceOrder addPayAccount(Long orderNumber, DoctorAccount doctorAccount) throws GenericException;

  ServiceOrder updateOrder(Long orderNumber, ModifiedAppointmentRequest modifiedAppointmentRequest) throws GenericException, IOException;

  ServiceOrder assign(Long id, ChangeAssigneeRequest changeAssigneeRequest) throws GenericException, IOException;

  ServiceOrder confirmedDoctor(Long orderNumber, ConfirmDoctorRequest confirmDoctorRequest) throws GenericException, IOException;

  ServiceOrder completeOrder(Long orderNumber, CompleteOrderRequest completeOrderRequest) throws GenericException, IOException;

  CreateReminderRequest createReminder(Long id, CreateReminderRequest createReminderRequest) throws GenericException, IOException;

  PostNotes createTrack(Long id, PostNotes postNotes) throws GenericException, IOException;

  PayPayment transfer(Long paymentNumber) throws GenericException, IOException;

  RefundPayment refund(Long paymentNumber) throws GenericException, IOException;

  ServicePayment getByPaymentNumber(Long paymentNumber) throws GenericException, IOException;

  ListResult<UserMenu> getUserMenu(String staffId) throws GenericException, IOException;

  ListResult<UserMenu> setUserMenu(String staffId, ListRequest<UserMenu> userMenuListRequest) throws GenericException, IOException;

  ServiceOrder cancelOrder(Long orderNumber, CancelOrderRequest cancelOrderRequest) throws GenericException, IOException;

  PagedResult<Order> searchOrder(
    OrderSearchRequest orderSearchRequest
  ) throws GenericException, IOException;


  UploadToken getFileToken(
    int type,
    String fileName,
    Integer sizeLimit,
    String MIME
  ) throws GenericException;


  UploadTokenV2 getFileTokenV2(
    int type,
    String fileName,
    Long sizeLimit,
    String MIME
  ) throws GenericException;


  ListResult<QiYeEmployee> listUsersInDepartment(int departmentId, Boolean inService) throws IOException, GenericException;


}
